using AiQiuQuan.Sport.Core;
using AiQiuQuan.Sport.WebApi.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace AiQiuQuan.Sport.WebApi.Controllers
{
    /// <summary>
    /// 比赛积分规则管理
    /// </summary>
    [ApiExplorerSettings(IgnoreApi = true)]
    [AllowAnonymous]
    public class PlatformGamePointRuleController : PcApiController
    {
        private readonly IGamePointRuleService _gamePointRuleService;

        /// <summary>
        /// 比赛管理
        /// </summary>
        public PlatformGamePointRuleController(
            IGamePointRuleService gamePointRuleService
            )
        {
            _gamePointRuleService = gamePointRuleService;
        }

        /// <summary>
        /// 初始化比赛积分规则
        /// </summary>
        [HttpGet("init")]
        public async Task<UnaryResult> InitAsync()
        {
            var result = await _gamePointRuleService.InitAsync();
            return result;
        }
    }
}
